<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./js/jsBridge.js" ></script>
  <script>
    function go() {
      // console.log(window)
      window.bridge.callHandler(name,data,callback)
    }
    function go1() {
      window.bridge.registerHandler(data,callback)
    }

    function test() {
      alert("test");
      window.bridge.callHandler("xz.log", "test");
    }

    function goback() {
      window.bridge.callHandler("xz.navigation.goBack", "goBack", function(result) {
      });
    }
    function closeWeb() {
      window.bridge.callHandler("xz.navigation.close", "close", function(result) {
      });
    }
    function setWebTitle() {
      window.bridge.callHandler("xz.navigation.setTitle", "setTitle", function(result) {
      });
    }
    function previewImage() {
      window.bridge.callHandler("xz.image.previewImage", "setTitle", function(result) {
      });
    }
    window.onload=setWebTitle
  </script>
</head>
<body>
  <!-- <div onclick="go()">aaa</div> -->
  <button onclick="go()">调用app方法</button>
  <button onclick="go1()">app抵用网页</button>
  <button onclick="test()">测试打印</button>
  <div>
    <button onclick="goback()">回退</button>
  </div>
  <div>
    <button onclick="closeWeb()">关闭当前网页</button>
  </div>
  <div>
    <button onclick="setWebTitle()" >设置导航栏标题</button>
  </div>
  <div>
    <button onclick="previewImage()">预览图片</button>
  </div>
</body>
</html>